Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix: do not include child terms for sponsored categories #179

Merged
merged 1 commit into from
May 4, 2022

Conversation

dkoo
Copy link
Contributor

@dkoo dkoo commented May 3, 2022

All Submissions:

Changes proposed in this Pull Request:

When querying sponsors for a hierarchical term, avoids querying children so as not to mark posts of non-sponsored child terms as sponsored.

Closes #64.

How to test the changes in this Pull Request:

Confirm that #64 is not reproducible.

Other information:

  • Have you added an explanation of what your changes do and why you'd like us to include them?
  • Have you written new tests for your changes, as applicable?
  • Have you successfully ran tests with your changes locally?

@dkoo dkoo added the bug Something isn't working label May 3, 2022
@dkoo dkoo requested a review from laurelfulford May 3, 2022 17:56
@dkoo dkoo requested a review from a team as a code owner May 3, 2022 17:56
@dkoo dkoo self-assigned this May 3, 2022
@dkoo
Copy link
Contributor Author

dkoo commented May 3, 2022

  1. View the sponsored category in WP Admin > Posts > Categories -- it will list two posts even though you've only assigned it to one; however if you click 'View' or the number count, it will only show the one post that it's actually assigned to.

I believe this is a WP bug and not related to anything in this plugin.

Copy link
Member

@miguelpeixe miguelpeixe left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Fixes the issue!

@dkoo dkoo merged commit 7834583 into master May 4, 2022
@dkoo dkoo deleted the fix/child-terms branch May 4, 2022 20:33
matticbot pushed a commit that referenced this pull request May 5, 2022
# [1.9.0-alpha.1](v1.8.0...v1.9.0-alpha.1) (2022-05-05)

### Bug Fixes

* do not include child terms for sponsored categories ([#179](#179)) ([7834583](7834583))

### Features

* ad targeting for gpt ([#180](#180)) ([6ab54ce](6ab54ce))
@matticbot
Copy link
Contributor

🎉 This PR is included in version 1.9.0-alpha.1 🎉

The release is available on GitHub release

Your semantic-release bot 📦🚀

matticbot pushed a commit that referenced this pull request May 18, 2022
# [1.9.0](v1.8.0...v1.9.0) (2022-05-18)

### Bug Fixes

* do not include child terms for sponsored categories ([#179](#179)) ([7834583](7834583))

### Features

* ad targeting for gpt ([#180](#180)) ([6ab54ce](6ab54ce))
@matticbot
Copy link
Contributor

🎉 This PR is included in version 1.9.0 🎉

The release is available on GitHub release

Your semantic-release bot 📦🚀

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Issue with assigning both parent and sibling categories of a sponsored category
3 participants